package com.ux.util
{
	/**
	 * @author winnie
	 */	
	public class MathUtil
	{
		
		
		/** 숫자를 비율로 반환 **/		
		public static function NumberToRate( targetMaxNum:Number, targetMinNum:Number, statusNum:Number ):Number 
		{
			return ( statusNum - targetMinNum ) / ( targetMaxNum - targetMinNum );
		}
		
		
		/** 비율을 숫자로  반환 **/		
		public static function RateToNumber( targetMaxNum:Number, initNum:Number, rate:Number ):Number 
		{
			return targetMaxNum * rate - initNum;
		}
		
		
		
		
		public function MathUtil()
		{
		}
	}
}